In computer science, a virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system. Each VM may function as a self-contained platform, running its own operating system (OS) and software applications (processes). Typically, a hypervisor manages allocation and virtualization of computer resources and performs context switching, as may be necessary, to cycle between various VMs.
A host machine (e.g., computer or server) is typically enabled to simultaneously run multiple VMs, where each VM may be used by a local or remote client. The host machine allocates a certain amount of the host's resources to each of the VMs. Each VM is then able to use the allocated resources to execute applications, including operating systems known as guest operating systems. The hypervisor virtualizes the underlying hardware of the host machine or emulates hardware devices, making the use of the VM transparent to the guest operating system or the remote client that uses the VM.
As a result, VMs think that they are running on real hardware, when, in fact, this hardware is being emulated by the hypervisor. During boot up of the operating system (OS) of a VM, the VM will often use a timer-based strategy to activate hardware devices of the VM. For example, when looking for devices on the PCI bus, a request is sent to a potential device and then the VM waits for up to 0.5 second for the device to respond. A PCI bus may have up to 32 devices, so this could potentially cause a delay of 15 seconds for the VM. This is just wasted time in a virtualized scenario because hardware responses are always immediate from emulated hardware devices on the VM. In addition, any physically-installed hardware devices will be discovered before-hand by the hypervisor, so the VM will be aware of their existence upon boot up. There are many examples of hardware-related delays like this in working with emulated hardware of a VM. Prior solutions to this time-wasting scenario include having the VM detect that devices it is talking to are fast and then shortening the timeouts applied by the VM.